from merengue.pluggable import Plugin

from plugins.sportteam.admin import (TechniqueAdmin, PlayerAdmin,
                                     ChronicleAdmin, TournamentTypeAdmin,
                                     TournamentAdmin, SubscriptionTournamentAdmin)

from plugins.sportteam.models import (Player, Chronicle, Tournament,
                                     TournamentType, SubscriptionTournament)

class PluginConfig(Plugin):
    name = 'Sport team'
    description = 'Sport team plugin'
    version = '0.0.1a'
    url_prefixes = (
        ('jugadores', 'plugins.sportteam.urls_player'),
        ('tecnicas', 'plugins.sportteam.urls_technique'),
        ('eventos', 'plugins.sportteam.urls_event'),
        ('torneos', 'plugins.sportteam.urls_tournament'),
    )

    @classmethod
    def get_model_admins(cls):
        return [
            (Player, PlayerAdmin),
            (Chronicle, ChronicleAdmin),
            (Tournament, TournamentAdmin),
            (TournamentType, TournamentTypeAdmin),
            (SubscriptionTournament, SubscriptionTournamentAdmin),
        ]